package cn.wolfcode.trip.base.service;

import cn.wolfcode.trip.base.domain.Order;
import cn.wolfcode.trip.base.query.OrderQueryObject;
import com.github.pagehelper.PageInfo;

import java.util.List;

public interface IOrderService {
    /**
     * 订单的高级查询
     * @param qo
     * @return
     */
    //PageInfo query(OrderQueryObject qo);

    /**
     * 通过id查询订单信息
     * @param id
     * @return
     */
    Order selectOrderById(Long id);

    /**
     * 订单的新增
     * @param userId
     * @param productIds
     * @param numbers
     * @param difference
     */
    void saveOrder(Long userId, Long[] productIds,Integer[] numbers,int difference);

    /**
     * 通过用户的所有订单
     * @param qo
     * @return
     */
    PageInfo queryOrders(OrderQueryObject qo);

    /**
     * 订单的删除
     * @param id
     */
    void delete(Long id);
}
